#pragma once
#include <QCamera>
#include "MyVideoSurface.h"

class CameraHandler : public QObject {
    Q_OBJECT
public:
    CameraHandler(QObject* par = nullptr);

    bool init();
    QCamera* camera;

signals:
    void pushImg(QImage);

private slots:
    void cameraError(QCamera::Error);
    void cameraImageCapture(QVideoFrame);

private:
    MyVideoSurface* videoSurface;
};